package com.lanou3g.code0411.exceptions;

/**
 * If there are no bugs, it was created by Chen FengYao on 2018/4/11;
 * Otherwise, I don't know who created it either
 */
// 索引越界异常
// 当用户的索引 超出了范围时
// 让程序停止运行,并给他明确的提示信息
    // 自定义异常: 自己创造异常
public class IndexOutException extends RuntimeException {
    public IndexOutException(int max, int currentIndex) {
        super("索引超出了范围,范围是0-" + max
                + ",你当前输入的是:" + currentIndex);
    }
}
